package com.lhy.controller;

import com.lhy.domain.PaymentDetails;
import com.lhy.service.PaymentDetailsService;
import com.lhy.utils.Pagination;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @author 汪
 */
@Controller
public class PaymentDetailsController {
    @Autowired
    PaymentDetailsService paymentDetailsService;
    @RequestMapping("/findSomePaymentDetails")
    public String findSomePaymentDetails(PaymentDetails paymentDetails, Pagination<PaymentDetails> page,HttpServletRequest req, HttpServletResponse resp){
        page.setQueryObject(paymentDetails);
        paymentDetailsService.findSomePaymentDetails(page);
        HttpSession session = req.getSession();
        session.setAttribute("paymentDetails",page);
        return "payDlist";
    }
}
